<div id="loginbox" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
    <div class="panel panel-default">
        <div class="panel-heading">
            <div class="panel-title">会员注册</div>
        </div>

        <div class="panel-body">
            <?php if ($error) { ?>
                <div class="alert alert-danger">
                    <p><?php echo $error; ?></p>
                </div>
            <?php } ?>
            <?php echo form_open('', 'id="loginform" role="form"'); ?>
            <?php $user_error = form_error('user_email', NULL, NULL); ?>
            <div class="form-group <?php echo $user_error ? 'has-error' : ''; ?>">
                <div class="input-group">
                    <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
                    <input id="user_email" type="text" class="form-control input-sm" name="user_email"
                           value="<?php echo set_value('user_email'); ?>"
                           placeholder="电子邮箱">
                </div>
                <?php if ($user_error) { ?>
                    <p class="help-block"><?php echo $user_error; ?></p>
                <?php } ?>
            </div>
            <?php $userName_error = form_error('user_name', NULL, NULL); ?>
            <div class="form-group <?php echo $userName_error ? 'has-error' : ''; ?>">
                <div class="input-group">
                    <span class="input-group-addon"><i class="fa fa-user"></i></span>
                    <input id="user_name" type="text" class="form-control input-sm" name="user_name"
                           value="<?php echo set_value('user_name'); ?>"
                           placeholder="用户名">
                </div>
                <?php if ($userName_error) { ?>
                    <p class="help-block"><?php echo $userName_error; ?></p>
                <?php } ?>
            </div>
            <?php $password_error = form_error('user_password', NULL, NULL); ?>
            <div class="form-group <?php echo $password_error ? 'has-error' : ''; ?>">
                <div class="input-group">
                    <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                    <input id="user_password" type="password" class="form-control input-sm" name="user_password"
                           value="<?php echo set_value('user_password'); ?>"
                           placeholder="密码">
                </div>
                <?php if ($password_error) { ?>
                    <p class="help-block"><?php echo $password_error; ?></p>
                <?php } ?>
            </div>
            <?php $RePassword_error = form_error('re_user_password', NULL, NULL); ?>
            <div class="form-group <?php echo $RePassword_error ? 'has-error' : ''; ?>">
                <div class="input-group">
                    <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                    <input id="user_password" type="password" class="form-control input-sm" name="re_user_password"
                           value="<?php echo set_value('re_user_password'); ?>"
                           placeholder="确认密码">
                </div>
                <?php if ($RePassword_error) { ?>
                    <p class="help-block"><?php echo $RePassword_error; ?></p>
                <?php } ?>
            </div>
            

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <button class="btn btn-success btn-sm" type="submit">
                            <i class="fa fa-sign-in"></i>
                            马上注册
                        </button>
                    </div>
                </div>
                
            </div>

            <hr class="hr-sm"/>
            <div class="form-group">
                我已经拥有一个账户!
                <a href="<?php echo $this->route_links->build_link('account_login'); ?>">
                    马上登陆
                </a>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>
